Integrand size = 40, antiderivative size = 145 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} \left (3 a^2 b B+2 b^3 B+a^3 C+6 a b^2 C\right ) x+\frac {b^3 C \text {arctanh}(\sin (c+d x))}{d}+\frac {a \left (2 a^2 B+8 b^2 B+9 a b C\right ) \sin (c+d x)}{3 d}+\frac {a^2 (5 b B+3 a C) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d} \]
[Out]
Time = 0.50 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {4157, 4110, 4159, 4132, 8, 4130, 3855} \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a \left (2 a^2 B+9 a b C+8 b^2 B\right ) \sin (c+d x)}{3 d}+\frac {a^2 (3 a C+5 b B) \sin (c+d x) \cos (c+d x)}{6 d}+\frac {1}{2} x \left (a^3 C+3 a^2 b B+6 a b^2 C+2 b^3 B\right )+\frac {a B \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}+\frac {b^3 C \text {arctanh}(\sin (c+d x))}{d} \]
[In]
[Out]
Rule 8
Rule 3855
Rule 4110
Rule 4130
Rule 4132
Rule 4157
Rule 4159
Rubi steps \begin{align*} \text {integral}& = \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 (B+C \sec (c+d x)) \, dx \\ & = \frac {a B \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}-\frac {1}{3} \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (-a (5 b B+3 a C)-\left (2 a^2 B+3 b^2 B+6 a b C\right ) \sec (c+d x)-3 b^2 C \sec ^2(c+d x)\right ) \, dx \\ & = \frac {a^2 (5 b B+3 a C) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {1}{6} \int \cos (c+d x) \left (2 a \left (2 a^2 B+8 b^2 B+9 a b C\right )+3 \left (3 a^2 b B+2 b^3 B+a^3 C+6 a b^2 C\right ) \sec (c+d x)+6 b^3 C \sec ^2(c+d x)\right ) \, dx \\ & = \frac {a^2 (5 b B+3 a C) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {1}{6} \int \cos (c+d x) \left (2 a \left (2 a^2 B+8 b^2 B+9 a b C\right )+6 b^3 C \sec ^2(c+d x)\right ) \, dx+\frac {1}{2} \left (3 a^2 b B+2 b^3 B+a^3 C+6 a b^2 C\right ) \int 1 \, dx \\ & = \frac {1}{2} \left (3 a^2 b B+2 b^3 B+a^3 C+6 a b^2 C\right ) x+\frac {a \left (2 a^2 B+8 b^2 B+9 a b C\right ) \sin (c+d x)}{3 d}+\frac {a^2 (5 b B+3 a C) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+\left (b^3 C\right ) \int \sec (c+d x) \, dx \\ & = \frac {1}{2} \left (3 a^2 b B+2 b^3 B+a^3 C+6 a b^2 C\right ) x+\frac {b^3 C \text {arctanh}(\sin (c+d x))}{d}+\frac {a \left (2 a^2 B+8 b^2 B+9 a b C\right ) \sin (c+d x)}{3 d}+\frac {a^2 (5 b B+3 a C) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {a B \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d} \\ \end{align*}
Time = 1.57 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.10 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {6 \left (3 a^2 b B+2 b^3 B+a^3 C+6 a b^2 C\right ) (c+d x)-12 b^3 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 b^3 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+9 a \left (a^2 B+4 b^2 B+4 a b C\right ) \sin (c+d x)+3 a^2 (3 b B+a C) \sin (2 (c+d x))+a^3 B \sin (3 (c+d x))}{12 d} \]
[In]
[Out]
Time = 0.49 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.94
method | result | size |
parallelrisch | \(\frac {-12 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{3}+12 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{3}+\left (9 B \,a^{2} b +3 a^{3} C \right ) \sin \left (2 d x +2 c \right )+B \,a^{3} \sin \left (3 d x +3 c \right )+9 a \left (B \,a^{2}+4 B \,b^{2}+4 C a b \right ) \sin \left (d x +c \right )+18 x d \left (B \,a^{2} b +\frac {2}{3} B \,b^{3}+\frac {1}{3} a^{3} C +2 C a \,b^{2}\right )}{12 d}\) | \(137\) |
derivativedivides | \(\frac {\frac {B \,a^{3} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+a^{3} C \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 B \,a^{2} b \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 C \,a^{2} b \sin \left (d x +c \right )+3 B a \,b^{2} \sin \left (d x +c \right )+3 C a \,b^{2} \left (d x +c \right )+B \,b^{3} \left (d x +c \right )+C \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(151\) |
default | \(\frac {\frac {B \,a^{3} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+a^{3} C \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 B \,a^{2} b \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 C \,a^{2} b \sin \left (d x +c \right )+3 B a \,b^{2} \sin \left (d x +c \right )+3 C a \,b^{2} \left (d x +c \right )+B \,b^{3} \left (d x +c \right )+C \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(151\) |
risch | \(\frac {3 B \,a^{2} b x}{2}+x B \,b^{3}+\frac {a^{3} x C}{2}+3 x C a \,b^{2}-\frac {3 i B \,a^{3} {\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} B a \,b^{2}}{2 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} a^{2} b C}{2 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{3}}{8 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} B a \,b^{2}}{2 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} a^{2} b C}{2 d}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}+\frac {B \,a^{3} \sin \left (3 d x +3 c \right )}{12 d}+\frac {3 \sin \left (2 d x +2 c \right ) B \,a^{2} b}{4 d}+\frac {\sin \left (2 d x +2 c \right ) a^{3} C}{4 d}\) | \(247\) |
norman | \(\frac {\left (\frac {3}{2} B \,a^{2} b +B \,b^{3}+\frac {1}{2} a^{3} C +3 C a \,b^{2}\right ) x +\left (\frac {3}{2} B \,a^{2} b +B \,b^{3}+\frac {1}{2} a^{3} C +3 C a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{16}+\left (-6 B \,a^{2} b -4 B \,b^{3}-2 a^{3} C -12 C a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-6 B \,a^{2} b -4 B \,b^{3}-2 a^{3} C -12 C a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (9 B \,a^{2} b +6 B \,b^{3}+3 a^{3} C +18 C a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\frac {a \left (2 B \,a^{2}-3 B a b -18 B \,b^{2}-C \,a^{2}-18 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}+\frac {a \left (2 B \,a^{2}-3 B a b +6 B \,b^{2}-C \,a^{2}+6 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{15}}{d}+\frac {a \left (2 B \,a^{2}+3 B a b -18 B \,b^{2}+C \,a^{2}-18 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}+\frac {a \left (2 B \,a^{2}+3 B a b +6 B \,b^{2}+C \,a^{2}+6 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a \left (2 B \,a^{2}-45 B a b +54 B \,b^{2}-15 C \,a^{2}+54 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{3 d}+\frac {a \left (2 B \,a^{2}+45 B a b +54 B \,b^{2}+15 C \,a^{2}+54 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}-\frac {a \left (14 B \,a^{2}-27 B a b +18 B \,b^{2}-9 C \,a^{2}+18 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{3 d}-\frac {a \left (14 B \,a^{2}+27 B a b +18 B \,b^{2}+9 C \,a^{2}+18 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}+\frac {C \,b^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {C \,b^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(622\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.90 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, C b^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, C b^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (C a^{3} + 3 \, B a^{2} b + 6 \, C a b^{2} + 2 \, B b^{3}\right )} d x + {\left (2 \, B a^{3} \cos \left (d x + c\right )^{2} + 4 \, B a^{3} + 18 \, C a^{2} b + 18 \, B a b^{2} + 3 \, {\left (C a^{3} + 3 \, B a^{2} b\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, d} \]
[In]
[Out]
Timed out. \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.05 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=-\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{3} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{3} - 9 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} b - 36 \, {\left (d x + c\right )} C a b^{2} - 12 \, {\left (d x + c\right )} B b^{3} - 6 \, C b^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 36 \, C a^{2} b \sin \left (d x + c\right ) - 36 \, B a b^{2} \sin \left (d x + c\right )}{12 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 314 vs. \(2 (137) = 274\).
Time = 0.33 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.17 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {6 \, C b^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 6 \, C b^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 3 \, {\left (C a^{3} + 3 \, B a^{2} b + 6 \, C a b^{2} + 2 \, B b^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (6 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 9 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 9 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
[In]
[Out]
Time = 19.00 (sec) , antiderivative size = 1924, normalized size of antiderivative = 13.27 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Too large to display} \]
[In]
[Out]